package com.ruoyi.ams.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ams.domain.AmsAssetMaintenanceRecord;
import com.ruoyi.ams.mapper.AmsAssetMaintenanceRecordMapper;
import com.ruoyi.ams.service.IAmsAssetMaintenanceRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 维保信息登记Service业务层处理
 * 
 * @author yfkj
 * @date 2022-05-16
 */
@Service
public class AmsAssetMaintenanceRecordServiceImpl extends ServiceImpl<AmsAssetMaintenanceRecordMapper, AmsAssetMaintenanceRecord>  implements IAmsAssetMaintenanceRecordService
{
    @Autowired
    private AmsAssetMaintenanceRecordMapper amsAssetMaintenanceRecordMapper;

    /**
     * 查询维保信息登记
     * 
     * @param maintenanceRecordId 维保信息登记主键
     * @return 维保信息登记
     */
    @Override
    public AmsAssetMaintenanceRecord selectAmsAssetMaintenanceRecordByMaintenanceRecordId(Long maintenanceRecordId)
    {
        return amsAssetMaintenanceRecordMapper.selectAmsAssetMaintenanceRecordByMaintenanceRecordId(maintenanceRecordId);
    }

    /**
     * 查询维保信息登记列表
     * 
     * @param amsAssetMaintenanceRecord 维保信息登记
     * @return 维保信息登记
     */
    @Override
    public List<AmsAssetMaintenanceRecord> selectAmsAssetMaintenanceRecordList(AmsAssetMaintenanceRecord amsAssetMaintenanceRecord)
    {
        return amsAssetMaintenanceRecordMapper.selectAmsAssetMaintenanceRecordList(amsAssetMaintenanceRecord);
    }

    /**
     * 新增维保信息登记
     * 
     * @param amsAssetMaintenanceRecord 维保信息登记
     * @return 结果
     */
    @Override
    public int insertAmsAssetMaintenanceRecord(AmsAssetMaintenanceRecord amsAssetMaintenanceRecord)
    {
        return amsAssetMaintenanceRecordMapper.insertAmsAssetMaintenanceRecord(amsAssetMaintenanceRecord);
    }

    /**
     * 修改维保信息登记
     * 
     * @param amsAssetMaintenanceRecord 维保信息登记
     * @return 结果
     */
    @Override
    public int updateAmsAssetMaintenanceRecord(AmsAssetMaintenanceRecord amsAssetMaintenanceRecord)
    {
        return amsAssetMaintenanceRecordMapper.updateAmsAssetMaintenanceRecord(amsAssetMaintenanceRecord);
    }

    /**
     * 批量删除维保信息登记
     * 
     * @param maintenanceRecordIds 需要删除的维保信息登记主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetMaintenanceRecordByMaintenanceRecordIds(Long[] maintenanceRecordIds)
    {
        return amsAssetMaintenanceRecordMapper.deleteAmsAssetMaintenanceRecordByMaintenanceRecordIds(maintenanceRecordIds);
    }

    /**
     * 删除维保信息登记信息
     * 
     * @param maintenanceRecordId 维保信息登记主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetMaintenanceRecordByMaintenanceRecordId(Long maintenanceRecordId)
    {
        return amsAssetMaintenanceRecordMapper.deleteAmsAssetMaintenanceRecordByMaintenanceRecordId(maintenanceRecordId);
    }
}
